(ns utests 
(:use clojure.test utils.writeDB utils.readbinfile main.server))


(deftest test-dejopen
                                       
    (is (= {:a 1 :b 2} (deserialize "{:a 1 :b 2}")))
    (is (= [1 2 3] (deserialize "[1 2 3]")))
    (is (= [1 [2] [3 4]] (deserialize "[1 [2] [3 4]]")))
    ;(is (= (String. "{:a 1 :b 2}") (serialize (.toString {:a 1 :b 2}))))
    (is (=  "[1 2 3]" (serialize [1 2 3] )))
    (is (= "[1 [2] [3 4]]" (serialize [1 [2] [3 4]])))
    (is (=  (:a {:a 1 :b 2 :c 3}) (:a (read-string "{:a 1 :b 2 :c 3}"))))
  )










(run-tests)
